- semantic_form_for @user do |f|
  - f.inputs do
    = f.input :email
    = f.input :first_name
    = f.input :last_name
    = f.input :phone_number
    = f.input :parent, :label_method => :official_name, :collection => User.all - [current_user], :label => 'Supervisor'
    = f.input :organization
    = f.input :employment
    = f.input :service_branch
    = f.input :rank, :group_by => :service_branch
    = f.input :status
  
  - if current_user.squadron_admin?
    - f.inputs do
      = f.input :squadron_admin
      = f.input :organization_admin

  %p.password_instructions
    When 'Manually set password' is checked the password set here because the new users's password,
    if not checked the user gets a random password assigned to them, and an email is sent with a link to
    set a new password.

  - f.inputs do
    = f.input :manually_set_password, :as => :boolean
    = f.input :password
    = f.input :password_confirmation

  - f.buttons do
    = f.commit_button 'Create User'
    %li.cancel_link= link_to 'Cancel', users_url
